import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import { BaseTimeEntity } from '@/common/entities/base-time.entity';


@Entity({name:"yh_sys_log"})
export class Log extends BaseTimeEntity {
    @PrimaryGeneratedColumn()
    id: number;
    
    @Column({ type: "varchar", comment: "用户标识", nullable: true })
    userFlag: string;
    
    @Column({ type: "varchar", comment: "请求ip", nullable: true })
    ip: string;
    
    @Column({ type: "varchar", comment: "日志名", nullable: true })
    name: string;
    
    @Column({ type: "varchar", comment: "请求方法", nullable: true })
    method: string;
    
    @Column({ type: "text", comment: "请求接口", nullable: true })
    path: string;
    
    @Column({ type: "text", comment: "请求参数", nullable: true })
    arguments
    
    @Column({ type: "int", comment: "状态码", nullable: true })
    status: number;
    
    @Column({ type: "varchar", comment: "错误消息", nullable: true })
    message: string;
    
    @Column({ type: "int", comment: "日志类型 0错误日志 1日常日志 ", default: 1 })
    type: number;
    
}
